
#ifndef _RECHERCHECOMPATIBILITE_H_
#define _RECHERCHECOMPATIBILITE_H_

#include <QXmlStreamWriter>

#include "ui_RechercheCompatibilite.h"
#include "Compatibilite.h"
#include "TrueLoveClient.h"
#include "RendezVous.h"

class RechercheCompatibilite : public QMainWindow, private Ui_RechercheCompatibilite
{
	Q_OBJECT

public:
	RechercheCompatibilite(QWidget *parent = 0);
	QList<Compatibilite> GetCompatibilites() { return compatibilites; }
	void InitCompatibilites();
	bool ExistsRendezVous(TrueLoveClient c1, TrueLoveClient c2);
	bool ExistsRelation(TrueLoveClient c1, TrueLoveClient c2);
	bool ContainsCompatibilite(TrueLoveClient c, TrueLoveClient cc);
	void closeEvent(QCloseEvent *event);
	static void SaveRendezVous(QList<RendezVous> rdvs);
	static void AddRdvXmlProperties(QXmlStreamWriter* writer, RendezVous rdv);
	~RechercheCompatibilite() {}

private:
	QList<Compatibilite> compatibilites;
	void majListe();
	
public slots:
	void retourAccueil();

	void updateStats(int idx);
	void makeRDV();
};

#endif

